/*
@Author   : Uyynot
@Email    : uyynot@qq.com
@Time     : 2023/10/17 18:41
@File     : main.go
@Project  : GoProject
@Desc     :
*/
package main

import (
	"GoProject/pkg/config"
	"GoProject/pkg/http"
	"GoProject/pkg/log"
	"GoProject/pkg/wire"
	"fmt"
)

func main() {
	conf := config.NewConfig()
	logger := log.NewLog(conf)
	servers, err := wire.NewApp(conf, logger)
	if err != nil {
		panic(err)
	}
	fmt.Printf("server start http://localhost:%s\n", conf.GetString("port"))
	//启动服务
	http.Run(servers.ServerHttp, fmt.Sprintf(":%d", conf.GetInt("port")))

}
